/*
 * test_xmath.cpp
 *
 *  Created on: 04/gen/2013
 *      Author: Administrator
 */
#include "xmath/xmath.h"

// haloa
#include <iostream>

using namespace std;

void testTitle(string t){
  cout<<endl<<endl<<t<<endl<<"--------------------------------------------------------------------"<<endl;
}

int main(){
  number n1;
  n1.val = -28;

  testTitle("number::dividers()");
  double e[10];
  n1.dividers(e);
  int i;
  cout<<"Dividers of "<<n1.val<<endl;
  for(i=0;i<sizeof(e)/sizeof(e[0]);i++){
      if(e[i]==NULL){break;}
      cout<<e[i]<<endl;
  }

  testTitle("number::pair()");
  cout<<n1.val<<" is";
  if(n1.pair()){cout<<" pair number";}else{cout<<" not pair number";}
  cout<<endl;

  testTitle("number::triangolar()");
  cout<<n1.val<<" is";
  if(n1.triangolar()){cout<<" triangola number";}else{cout<<" not triangolar number";}
  cout<<endl;

  testTitle("number::group()");
  cout<<"Group of number "<<n1.val<<" is "<<n1.group()<<endl;

  testTitle("number::perfect()");
  cout<<n1.val<<" is";
  if(n1.perfect()){cout<<" a perfect number";}else{cout<<" not a perfect number";}
  cout<<endl;

  return 0;
}

